﻿// See https://aka.ms/new-console-template for more information
using Grpc.Net.Client;
using XLZF.MicroServices.IDS4;

var channel = GrpcChannel.ForAddress("https://localhost:7231");

var client = new Users.UsersClient(channel);

var reply = await client.GetUserModelAsync(new GetUserRequest { Userid = "1" });

List<Person> persons = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Person>>(reply.Person.ToString());

Console.WriteLine("User 服务返回数据: " + persons[0].Nickname);

Console.ReadKey();